home *** CD-ROM | disk | FTP | other *** search
- /*******************************************************************************
- * Copyright © 1992-1993 Mark Pilgrim *
- * *
- * This file is provided as is, and may be freely distributed unaltered. This *
- * message must accompany any copy of this file. This file may be used or *
- * modified for use for a non-commercial product provided that appropriate *
- * credit is given to the author named above. *
- * Commercial use of this source code is prohibited. *
- ******************************************************************************/
-
- #include "msg misc.h"
- #include "msg timing.h"
-
- #define gap 10
- #define CorrectTime 1
-
- void CasteWipe(GrafPtr);
-
- /* This takes a strip (starting with the topmost strip, moving down) and copies
- it into all the strips starting with the bottom and moving up until it's in
- the right place. */
-
- void CasteWipe(GrafPtr sourceGrafPtr)
- {
- int srcy, barpos;
- Rect src, dest;
- Boolean everyOther;
-
- everyOther=FALSE;
- src.left = 0;
- src.right = MAIN_WINDOW_WIDTH;
-
- for(srcy = 0; srcy < MAIN_WINDOW_HEIGHT; srcy += gap)
- {
- for(barpos = 0; barpos + gap < MAIN_WINDOW_HEIGHT; barpos += gap);
- for(; barpos >= srcy; barpos -= gap)
- {
- StartTiming();
- src.top = srcy;
- src.bottom = srcy + gap;
- dest = src;
- dest.top = barpos;
- dest.bottom = barpos + gap;
- CopyBits(&(sourceGrafPtr->portBits), &(gMainWindow->portBits),
- &src, &dest, 0, 0L);
- if (everyOther) /* simulates time correction 0.5 */
- TimeCorrection(CorrectTime);
- everyOther=!everyOther;
- }
- }
- }